09. 修正数据类型第 1 部分
修正数据类型
在接下来的三个部分中,你将进行以下更改,以使数据类型一致和实用。
解决
cyl
数据类型
- 2008: 从字符串中提取整型。
- 2018: 将浮点型转换为整型。
解决
air_pollution_score
数据类型
- 2008: 将字符串转换为浮点型。
- 2018: 将整型转换为浮点型。
解决
city_mpg
、
hwy_mpg
、
cmb_mpg
数据类型
- 2008 和 2018: 将字符串转换为浮点型。
解决
greenhouse_gas_score
数据类型
- 2008: 从浮点型转换为整型。
在第一部分,你将解决第一个问题,修正
cyl
数据类型。
Workspace
This section contains either a workspace (it can be a Jupyter Notebook workspace or an online code editor work space, etc.) and it cannot be automatically downloaded to be generated here. Please access the classroom with your account and manually download the workspace to your local machine. Note that for some courses, Udacity upload the workspace files onto https://github.com/udacity , so you may be able to download them there.
Workspace Information:
- Default file path:
- Workspace type: jupyter
- Opened files (when workspace is loaded): n/a